const userService = require("../service/user.service");
class userController {
  async create(ctx, next) {
    const user = ctx.request.body;
    await userService.create(user);

    ctx.body = {
      status: 200,
      message: "用户创建成功~",
    };
  }
  async getUserInfo(ctx, next) {
    const { name } = ctx.request.body;
    const result = await userService.getUserByName(name);
    ctx.body = result;
  }
}

module.exports = new userController();
